Private Declare Function WNetConnectionDialog Lib _
"mpr.dll" Alias "WNetConnectionDialog" (ByVal hwnd As _
Long, ByVal dwType As Long) As Long 

Sub ShowPrinterPort(hWnd As Long) 
WNetConnectionDialog hWnd, 2 
End Sub

 

